package com.neu.eurekaconsumertea.controller;

import com.neu.dto.TeaDto;
import com.neu.eurekaconsumertea.service.TeaService;
import com.neu.util.CommonResult;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@CrossOrigin
@RestController
@RequestMapping("/tea")
public class TeaController {
    @Resource
    private TeaService teaService;
    @RequestMapping("/reg")
    public CommonResult reg(@RequestBody TeaDto dto){
        return teaService.doReg(dto);
    }
}
